from django.contrib import admin
from vcs.models import *


class RepositoryAdmin(admin.ModelAdmin):
    """
    Admin for the repository.
    """
    list_display = ['name', 'repository_type', 'url']

admin.site.register(Repository, RepositoryAdmin)


class BranchAdmin(admin.ModelAdmin):
    """
    Admin for a branch.
    """
    list_display = ['repository', 'name']

admin.site.register(Branch, BranchAdmin)


class CommitAdmin(admin.ModelAdmin):
    """
    Admin for commit.
    """
    list_display = ['repository', 'identifier', 'committer', 'message']

admin.site.register(Commit, CommitAdmin)


admin.site.register(FileModification)
